package com.ruoyi.accountant.domain.other;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/***
 * 表示一个金流流动项目
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CashFlowItem {
    private String accountName;

    private BigDecimal money;
    private String currencyName;

    private List<CashFlowItem> itemList = new ArrayList<>(); // 每一个具体项目

    public CashFlowItem(BigDecimal money, String currencyName, String accountName) {
        this.money = money;
        this.currencyName = currencyName;
        this.accountName = accountName;
    }

    public void add(CashFlowItem item) {
        itemList.add(item);
    }
}
